# -*- coding:utf-8 -*-
# @FileName  :per_own_report.py
# @Time      :2020/12/17 10:26
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class PerOwnReportRequest:
    @classmethod
    def get_page(cls,curPage,
            maxSize,
            search_EQ_customerName,
            search_EQ_certType,
            search_EQ_certNo,
            search_EQ_qryReason,
            search_EQ_queryType,
            search_EQ_source,
            search_EQ_status,
            search_EQ_queryFormat,
            search_GTE_LTE_queryTime_DATE_RANGE,
            search_EQ_batchFlag,cookie):
        '''检索'''
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_customerName':search_EQ_customerName,
            'search_EQ_certType':search_EQ_certType,
            'search_EQ_certNo':search_EQ_certNo,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_queryType':search_EQ_queryType,
            'search_EQ_source':search_EQ_source,
            'search_EQ_status':search_EQ_status,
            'search_EQ_queryFormat':search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE':search_GTE_LTE_queryTime_DATE_RANGE,
            'search_EQ_batchFlag':search_EQ_batchFlag
        }
        req = Request(ServerUrl.per_own_report_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def detail(cls,id,cookie):
        '''详情跳转'''
        params = {
            'id':id
        }
        req = Request(ServerUrl.per_own_report_detail_url,params=params,headers=cookie)
        return req.get()

    @classmethod
    def findbyid(cls,id,cookie):
        '''详情'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.per_own_report_findbyid_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def exportload(cls,
            search_EQ_customerName,
            search_EQ_certType,
            search_EQ_certNo,
            search_EQ_qryReason,
            search_EQ_queryType,
            search_EQ_source,
            search_EQ_status,
            search_EQ_queryFormat,
            search_GTE_LTE_queryTime_DATE_RANGE,
            search_EQ_batchFlag,ids,cookie):
        params = {
            'search_EQ_customerName': search_EQ_customerName,
            'search_EQ_certType': search_EQ_certType,
            'search_EQ_certNo': search_EQ_certNo,
            'search_EQ_qryReason': search_EQ_qryReason,
            'search_EQ_queryType': search_EQ_queryType,
            'search_EQ_source': search_EQ_source,
            'search_EQ_status': search_EQ_status,
            'search_EQ_queryFormat': search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE': search_GTE_LTE_queryTime_DATE_RANGE,
            'search_EQ_batchFlag': search_EQ_batchFlag,
            'ids':ids

        }
        req = Request(ServerUrl.per_own_report_exportload_url,params=params,headers=cookie)
        return req.get_download()

    @classmethod
    def getstatus(cls,id,cookie):
        data = {
            'id':id
        }
        req = Request(ServerUrl.per_own_report_getstatus_url,params=data,headers=cookie)
        return req.post()





if __name__ == "__main__":
    pass